package twitter.client.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DatabaseOpenHelper extends SQLiteOpenHelper {
	
	private static final int DATABASE_VERSION = 1;
	private static final String DATABASE_NAME = "twitterclient.db";
	
	private static final String CREATE_TABLE_ACCOUNT_SQL =
			"CREATE TABLE account (" +
			"id TEXT, " +
			"name TEXT," +
			"screen_name TEXT, " +
			"profile_image_url TEXT, " +
			"access_token TEXT, " +
			"access_token_secret TEXT);";
	
	public DatabaseOpenHelper(Context context){
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		Log.d("DatabaseOpenHelper", "onCreate");
		db.execSQL(CREATE_TABLE_ACCOUNT_SQL);
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		
	}

}
